<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/commons/jsp/taglibs.jsp"%>
<%@taglib uri="http://www.framework.com/taglib" prefix="frame"%>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<div class="easyui-panel" data-options="border:false" style="padding: 6px">
<c:choose>
	<c:when test="${loginUserType == '2' }">
		<c:if test="${not empty eval}">
	<div class="easyui-panel" data-options="border:true,title:'首次评价'" style="padding:6px;margin-bottom: 6px">
	<table class="infoTable" style="margin-top: 0px;width:100%">
		<tbody>
			<tr>
				<th align="right" width="17%">商品描述</th>
					<td width="83%">
					<span >
						<c:forEach var="t" begin="1" end="${eval.description}">
							<img src="${ctx}/commons/images/evalueate/T1e.png"/>
						</c:forEach>
						<c:if test="${eval.description < 5}">
							<c:forEach begin="1" end="${5-eval.description}">
								<img src="${ctx}/commons/images/evalueate/T1j.png"/>
							</c:forEach>
						</c:if>
					</span>
				</td>
			</tr>
			<tr>
				<th align="right" width="15%">服务态度</th>
					<td width="35%">
						<span >
							<c:forEach var="t" begin="1" end="${eval.attitude}">
								<img src="${ctx}/commons/images/evalueate/T1e.png"/>
							</c:forEach>
							<c:if test="${eval.attitude < 5}">
								<c:forEach begin="1" end="${5-eval.attitude}">
									<img src="${ctx}/commons/images/evalueate/T1j.png"/>
								</c:forEach>
							</c:if>
						</span>
					</td>
			</tr>
			<tr>
				<th align="right" width="15%">发货速度</th>
					<td width="35%">
						<span >
							<c:forEach var="t" begin="1" end="${eval.speed}">
								<img src="${ctx}/commons/images/evalueate/T1e.png"/>
							</c:forEach>
							<c:if test="${eval.speed < 5}">
								<c:forEach begin="1" end="${5-eval.speed}">
									<img src="${ctx}/commons/images/evalueate/T1j.png"/>
								</c:forEach>
							</c:if>
						</span>
					</td>
			</tr>
			<tr>
				<td align="right" width="15%">评价内容</td>
				<td width="35%">
					${eval.content}
				</td>
			</tr>
		</tbody>
	</table>
</div>
</c:if>
<c:if test="${param.idx != 3}">
	<div class="easyui-panel" data-options="border:true,title:'追加评价'" style="padding:6px;">
		<form action="${ctx }/business/order/saveEvalueate" method="post" name ="addDataForm" id="addGoodsEvalueateForm">
	<input type="hidden" name="goodsId" value="${param.userId}"/>
	<input type="hidden" name="orderId" value="${param.orderId}"/>
	<table class="infoTable">
		<tbody>
			<tr>
				<th align="right" width="16%">商品描述</th>
					<td width="84%">
					<span class="ks-simplestar-first">
						<img src="${ctx}/commons/images/evalueate/T1j.png"/>
						<img src="${ctx}/commons/images/evalueate/T1j.png"/>
						<img src="${ctx}/commons/images/evalueate/T1j.png"/>
						<img src="${ctx}/commons/images/evalueate/T1j.png"/>
						<img src="${ctx}/commons/images/evalueate/T1j.png"/>
					</span>
				</td>
			</tr>
			<tr>
				<th align="right" width="15%">服务态度</th>
					<td width="35%">
					<span class="ks-simplestar-second">
						<img src="${ctx}/commons/images/evalueate/T1j.png"/>
						<img src="${ctx}/commons/images/evalueate/T1j.png"/>
						<img src="${ctx}/commons/images/evalueate/T1j.png"/>
						<img src="${ctx}/commons/images/evalueate/T1j.png"/>
						<img src="${ctx}/commons/images/evalueate/T1j.png"/>
					</span>
				</td>
			</tr>
			<tr>
					<th align="right" width="15%">发货速度</th>
						<td width="35%">
						<span class="ks-simplestar-three">
							<img src="${ctx}/commons/images/evalueate/T1j.png"/>
							<img src="${ctx}/commons/images/evalueate/T1j.png"/>
							<img src="${ctx}/commons/images/evalueate/T1j.png"/>
							<img src="${ctx}/commons/images/evalueate/T1j.png"/>
							<img src="${ctx}/commons/images/evalueate/T1j.png"/>
						</span>
					</td>
				</tr>
			<tr>
				<td align="right" width="15%">评价内容</td>
				<td width="35%">
					<textarea name="content" style="height:160px;width:420px;" rows="3" cols="20" maxlength="512"></textarea>
				</td>
			</tr>
		</tbody>
	</table>
</form>
	</div>
	</c:if>
	</c:when>
	
	
	<c:when test="${loginUserType == '1'}">
	<c:if test="${not empty eval}">
	<div class="easyui-panel" data-options="border:true,title:'首次评价'" style="padding:10px;">
	<table class="infoTable" style="margin-top: 0px;width:100%">
		<tbody>
			<tr>
				<th align="right" width="17%">买方诚信</th>
					<td width="83%">
					<span >
						<c:forEach var="t" begin="1" end="${eval.description}">
							<img src="${ctx}/commons/images/evalueate/T1e.png"/>
						</c:forEach>
						<c:if test="${eval.description < 5}">
							<c:forEach begin="1" end="${5-eval.description}">
								<img src="${ctx}/commons/images/evalueate/T1j.png"/>
							</c:forEach>
						</c:if>
					</span>
				</td>
			</tr>
			<tr>
				<td align="right" width="15%">评价内容</td>
				<td width="35%">
					${eval.content}
				</td>
			</tr>
		</tbody>
	</table>
</div>
</c:if>
<c:if test="${param.idx != 3}">
	<div class="easyui-panel" data-options="border:true,title:'追加评价'" style="padding:6px;">
		<form action="${ctx }/business/order/saveEvalueate" method="post" name ="addDataForm" id="addGoodsEvalueateForm">
	<input type="hidden" name="goodsId" value="${param.userId}"/>
	<input type="hidden" name="orderId" value="${param.orderId}"/>
	<table class="infoTable">
		<tbody>
			<tr>
				<th align="right" width="17%">买方诚信</th>
					<td width="83%">
					<span class="ks-simplestar-first">
						<img src="${ctx}/commons/images/evalueate/T1j.png"/>
						<img src="${ctx}/commons/images/evalueate/T1j.png"/>
						<img src="${ctx}/commons/images/evalueate/T1j.png"/>
						<img src="${ctx}/commons/images/evalueate/T1j.png"/>
						<img src="${ctx}/commons/images/evalueate/T1j.png"/>
					</span>
				</td>
			</tr>
			<tr>
				<td align="right" width="15%">评价内容</td>
				<td width="35%">
					<textarea name="content" style="height:160px;width:420px;" rows="3" cols="20" maxlength="512"></textarea>
				</td>
			</tr>
		</tbody>
	</table>
</form>
	</div>
	</c:if>
	</c:when>
</c:choose>
</div>
<script type="text/javascript">
	var description = -1;
	var attitude = -1;
	var speed = -1;
	$(function(){
		$(".ks-simplestar-first img").mouseover(function(){
			description = $(this).index()+1;
		  	 $(".ks-simplestar-first img:lt("+description+")").attr("src","${ctx}/commons/images/evalueate/T1e.png");
			description = description -1;
		   	$(".ks-simplestar-first img:gt("+description+")").attr("src","${ctx}/commons/images/evalueate/T1j.png");
		});
		$(".ks-simplestar-second img").mouseover(function(){
			attitude = $(this).index()+1;
		  	 $(".ks-simplestar-second img:lt("+attitude+")").attr("src","${ctx}/commons/images/evalueate/T1e.png");
			attitude = attitude -1;
		   	$(".ks-simplestar-second img:gt("+attitude+")").attr("src","${ctx}/commons/images/evalueate/T1j.png");
		});
		$(".ks-simplestar-three img").mouseover(function(){
			speed = $(this).index()+1;
		  	 $(".ks-simplestar-three img:lt("+speed+")").attr("src","${ctx}/commons/images/evalueate/T1e.png");
			speed = speed -1;
		   	$(".ks-simplestar-three img:gt("+speed+")").attr("src","${ctx}/commons/images/evalueate/T1j.png");
		});
	})
</script>